import {lazy} from 'react';

// 配置路由表
const routers=[
    // 一级路由重定向
    {
        from:'/',
        to:"/home"
    },
    // 一级路由
    {
        path:"/login",
        name:'Login',
        meta:{
            title:'八维管理系统'
        },
        component:lazy(()=> import('../pages/Login'))
    },
    {
        path:"/home",
        name:"Home",
        isLogin:true,
        meta:{
            title:'首页'
        },
        component:lazy(()=> import('../pages/Home'))
    },
    {
        path:"/registry",
        name:"Registry",
        meta:{
            title:'注册'
        },
        component:lazy(()=> import('../pages/Registry'))
    }
]

// 设置对象
const routerConfig={
    mode:'history',
    routes:routers
}

export default routerConfig;